//
//  DetailsTableViewCell.m
//  WWXELuShang
//
//  Created by lanou on 15/12/19.
//  Copyright © 2015年 lanou. All rights reserved.
//

#import "DetailsTableViewCell.h"
#import "Radio.h"

@implementation DetailsTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];

        
        
        self.albumLabel = [[UILabel alloc]initWithFrame:CGRectMake(20, 10, 150, 20)];
        self.albumLabel.font = [UIFont boldSystemFontOfSize:14];
        self.albumLabel.textColor = [UIColor whiteColor];
        [self.contentView addSubview:self.albumLabel];
        
        
        self.playLabel = [[UILabel alloc]initWithFrame:CGRectMake(kWidth - 120, 5, 100, 15)];
        self.playLabel.font = [UIFont systemFontOfSize:14];
//        self.playLabel.text = @"播放状态";
        self.playLabel.textColor = [UIColor whiteColor];
        self.playLabel.textAlignment = NSTextAlignmentCenter;
        
        [self.contentView addSubview:self.playLabel];
        
        
        self.programtimeLabel = [[UILabel alloc]initWithFrame:CGRectMake(kWidth - 150, 20, 150, 15)];
        self.programtimeLabel.font = [UIFont systemFontOfSize:14];
        self.programtimeLabel.textColor = [UIColor whiteColor];
        self.programtimeLabel.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:self.programtimeLabel];
        
        self.iconView = [[PlayingImageView alloc]initWithFrame:CGRectMake(20, 10, 15, 15)];
        
        [self.contentView addSubview:self.iconView];
        
        
    }
    return self;
}





- (void)setRadio:(Radio *)radio{
    if (_radio != radio) {
        _radio = radio;
        
        
        self.albumLabel.text = radio.album;
        self.programtimeLabel.text = radio.programtime;
        
    }
}




- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
